﻿using System;

class FighterAttack
{
    static void Main()
    {
        //Telerik Academy Exam 1 @ 7 Dec 2011 Morning

        checked
        {
            int plantXOne = int.Parse(Console.ReadLine());
            int plantYOne = int.Parse(Console.ReadLine());
            int plantXTwo = int.Parse(Console.ReadLine());
            int plantYTwo = int.Parse(Console.ReadLine());

            int figtherX = int.Parse(Console.ReadLine());
            int figtherY = int.Parse(Console.ReadLine());

            int distance = int.Parse(Console.ReadLine());

            int targetX = figtherX + distance;
            int targetY = figtherY;

            int score = 0;

            if (plantXOne > plantXTwo)
            {
                int temp = plantXOne;
                plantXOne = plantXTwo;
                plantXTwo = temp;
            }

            if (plantYOne > plantYTwo)
            {
                int newTemp = plantYOne;
                plantYOne = plantYTwo;
                plantYTwo = newTemp;
            }
           
            if (targetX >= plantXOne && targetX <= plantXTwo)
            {
                if (targetY >= plantYOne && targetY <= plantYTwo)
                {
                    score += 100;
                }
                if (targetY + 1 >= plantYOne && targetY + 1 <= plantYTwo)
                {
                    score += 50;
                }
                if (targetY - 1 >= plantYOne && targetY - 1 <= plantYTwo)
                {
                    score += 50;
                }
                if (targetX + 1 <= plantXTwo)
                {
                    score += 75;
                }                
            }
            else if (targetX + 1 >= plantXOne && targetX + 1 <= plantXTwo)
            {
                if (targetY >= plantYOne && targetY <= plantYTwo)
                {
                    score += 75;
                }
                
            }
            
            Console.WriteLine(score + "%");
        }
        
    }
}

